# class Animal(object):
#     def __init__(self, name, age):
#         self.name = name
#         self.age = age
#         # self.breed = breed
#     def eat(self):
#         print("eating...")
#
#     def sleep(self):
#         # print("self...", id(self))
#         print("sleeping...")
#
# class Dog(Animal):
#     def __init__(self,name, age, breed):
#         super().__init__(name, age)
#         self.breed = breed
#
#     def swimming(self):
#         print("swimming...")
#
# class Cat(Animal):
#     def __init__(self,name, age, color):
#         super().__init__(name, age)
#         self.color = color
#
#     alex = Dog("alex", 34, "斗牛犬")
#     def climb_tree(self):
#         print("climb tree...")
#
# c1 = Cat("喵喵", 2, "white")
# c1.climb_tree()

# print(id(alex))
# alex.swimming()
class Base:
    def __init__(self):
        self.func()
    def func(self):
        print('in base')

class Son(Base):
    def func(self):
        print('in son')

s = Son()



